import router from '.';

const ShopList = () => import('@/pages/ShopList');
const Category = () => import('@/pages/Category');
const Home = () => import('@/pages/Home');
const Login = () => import('@/pages/Login');
const Register = () => import('@/pages/Register');
const Search = () => import('@/pages/Search');
const WorthBuy = () => import('@/pages/WorthBuy');
const Center = () => import('@/pages/Center');
const Detail = () => import('@/pages/Detail');
const Cart = () => import('@/pages/Cart');

const routes = [
  {
    name: 'shop-list', //商品列表-->杨凯
    path: '/shop-list',
    meta: { isShowTabBar: false },
    component: ShopList,
  },
  {
    name: 'category', //分类-->杨凯
    path: '/category',
    meta: { isShowTabBar: true },
    component: Category,
  },
  {
    name: 'home', //首页-->盛敏芝
    path: '/home',
    meta: { isShowTabBar: true },
    component: Home,
  },
  {
    name: 'login', //登陆-->洪直航
    path: '/login',
    meta: { isShowTabBar: false },
    component: Login,
  },
  {
    name: 'center', //个人中心-->洪直航
    path: '/center',
    meta: { isShowTabBar: true },
    component: Center,
  },
  {
    name: 'register', //注册-->洪直航
    path: '/register',
    meta: { isShowTabBar: false },
    component: Register,
  },
  {
    name: 'worth-buy', //值得买-->黄璐
    path: '/worth-buy',
    meta: { isShowTabBar: true },
    component: WorthBuy,
  },

  {
    name: 'detail', //详情-->张航瑞
    path: '/detail',
    meta: { isShowTabBar: false },
    component: Detail,
  },
  {
    name: 'cart', //购物车-->张航瑞
    path: '/cart',
    meta: { isShowTabBar: true },
    component: Cart,
  },
  {
    name: 'search', //搜索-->张永辉
    path: '/search',
    meta: { isShowTabBar: false },
    component: Search,
  },
  {
    path: '/', //默认重定向
    redirect: '/home',
  },
];
export default routes;
